﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Xamarin.Forms;
using Naxam.Controls.Forms;

namespace CnBlogsClient.Views.News
{
    public class NewsTopTabbedPage : TopTabbedPage
    {
        bool hasInitialization;
        public NewsTopTabbedPage()
        {
            Title = "新闻";
            Icon = "menu_news.png";
        }

        protected override void OnAppearing()
        {
            base.OnAppearing();

            if (!hasInitialization)
            {
                this.Children.Add(new NewsPage(0) { Title = "最新新闻" });
                this.Children.Add(new NewsPage(1) { Title = "推荐新闻" });
                this.Children.Add(new NewsPage(2) { Title = "本周热门" });

                hasInitialization = true;
            }
        }
    }
}